package com.levi.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author shentong
 * @since 2022/4/5 11:32 AM
 */
@Data
@TableName("mall_order")
@ApiModel("订单实体类")
public class Order extends BaseEntity{
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    @TableField("order_no")
    @ApiModelProperty("订单号")
    private Long orderNo;

    @TableField("user_id")
    @ApiModelProperty("用户ID")
    private Integer userId;


    @TableField("shipping_id")
    @ApiModelProperty("收货地址id")
    private Integer shippingId;


    @TableField("payment")
    @ApiModelProperty("实际付款金额")
    private BigDecimal payment;


    @TableField("payment_type")
    @ApiModelProperty("付款方式")
    private Integer paymentType;

    @TableField("postage")
    @ApiModelProperty("运费，单位元")
    private Integer postage;

    @TableField("status")
    @ApiModelProperty("订单状态:0-已取消-10-未付款，20-已付款，40-已发货，50-交易成功，60-交易关闭")
    private Integer status;

    @TableField("send_time")
    @ApiModelProperty("发货时间")
    private Date sendTime;

    @TableField("payment_time")
    @ApiModelProperty("付款时间")
    private Date paymentTime;

    @TableField("close_time")
    @ApiModelProperty("订单关闭时间")
    private Date closeTime;

    @TableField("end_time")
    @ApiModelProperty("订单完成时间")
    private Date endTime;

}
